package com.mango.game.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户主表
 * </p>
 *
 * @author Mango
 * @since 2025-02-24
 */
@TableName("user_info")
public class UserInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户唯一标识
     */
    @TableId("uid")
    private Long uid;

    /**
     * 记录创建时间
     */
    @TableField("created_at")
    private LocalDateTime createdAt;

    /**
     * 记录更新时间
     */
    @TableField("updated_at")
    private LocalDateTime updatedAt;

    /**
     * 所属命名空间ID
     */
    @TableField("name_space")
    private Long nameSpace;

    /**
     * 所属游戏ID
     */
    @TableField("game_id")
    private Long gameId;

    /**
     * 所属渠道ID
     */
    @TableField("channel_id")
    private Long channelId;

    /**
     * 所属产品ID
     */
    @TableField("products_id")
    private Long productsId;

    /**
     * 登录用户名（不同命名空间下可以重复）
     */
    @TableField("username")
    private String username;

    /**
     * 用户昵称
     */
    @TableField("nick_name")
    private String nickName;

    /**
     * 真实姓名
     */
    @TableField("real_name")
    private String realName;

    /**
     * 身份证号
     */
    @TableField("id_number")
    private String idNumber;

    /**
     * 上架平台绑定的用户ID
     */
    @TableField("open_id")
    private String openId;

    /**
     * 性别 0-未知 1-男 2-女
     */
    @TableField("gender")
    private Byte gender;

    /**
     * 账号密码未加密
     */
    @TableField("password")
    private String password;

    /**
     * 加密后的密码
     */
    @TableField("password_hash")
    private String passwordHash;

    /**
     * 头像URL地址
     */
    @TableField("avatar_url")
    private String avatarUrl;

    /**
     * 出生日期
     */
    @TableField("birthday")
    private LocalDate birthday;

    /**
     * 注册时间
     */
    @TableField("register_time")
    private LocalDateTime registerTime;

    /**
     * 最后登录时间
     */
    @TableField("last_login_time")
    private LocalDateTime lastLoginTime;

    /**
     * 最后登录IP
     */
    @TableField("last_login_ip")
    private String lastLoginIp;

    /**
     * 注册IP
     */
    @TableField("register_ip")
    private String registerIp;

    /**
     * 状态 0-正常 1-冻结
     */
    @TableField("status")
    private Byte status;

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public Long getNameSpace() {
        return nameSpace;
    }

    public void setNameSpace(Long nameSpace) {
        this.nameSpace = nameSpace;
    }

    public Long getGameId() {
        return gameId;
    }

    public void setGameId(Long gameId) {
        this.gameId = gameId;
    }

    public Long getChannelId() {
        return channelId;
    }

    public void setChannelId(Long channelId) {
        this.channelId = channelId;
    }

    public Long getProductsId() {
        return productsId;
    }

    public void setProductsId(Long productsId) {
        this.productsId = productsId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public Byte getGender() {
        return gender;
    }

    public void setGender(Byte gender) {
        this.gender = gender;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPasswordHash() {
        return passwordHash;
    }

    public void setPasswordHash(String passwordHash) {
        this.passwordHash = passwordHash;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public LocalDateTime getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(LocalDateTime registerTime) {
        this.registerTime = registerTime;
    }

    public LocalDateTime getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(LocalDateTime lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }

    public String getRegisterIp() {
        return registerIp;
    }

    public void setRegisterIp(String registerIp) {
        this.registerIp = registerIp;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "UserInfo{" +
        "uid = " + uid +
        ", createdAt = " + createdAt +
        ", updatedAt = " + updatedAt +
        ", nameSpace = " + nameSpace +
        ", gameId = " + gameId +
        ", channelId = " + channelId +
        ", productsId = " + productsId +
        ", username = " + username +
        ", nickName = " + nickName +
        ", realName = " + realName +
        ", idNumber = " + idNumber +
        ", openId = " + openId +
        ", gender = " + gender +
        ", password = " + password +
        ", passwordHash = " + passwordHash +
        ", avatarUrl = " + avatarUrl +
        ", birthday = " + birthday +
        ", registerTime = " + registerTime +
        ", lastLoginTime = " + lastLoginTime +
        ", lastLoginIp = " + lastLoginIp +
        ", registerIp = " + registerIp +
        ", status = " + status +
        "}";
    }
}
